#include <stdio.h>

union u {
    char ch;
    int  i;
};

int main(int argc, char *argv[])
{
    union u num;
    num.i = 0x11223344;

    printf("num.ch = %#x\n", num.ch);
    if (num.ch == 0x11) {
        printf("big endian.\n");
    }


    if (num.ch == 0x44) {
        printf("little endian.\n");
    }

    return 0;
}
